Skip to contents

Remove terms from a model specification

Usage

drop_terms(spec, ...)

Arguments

spec

A model_spec object.

...

Terms to remove. Accepts unquoted names, strings, or expressions. Terms not present in spec are silently ignored.

Value

A new model_spec with the named terms removed.

Examples

base_m <- model_spec(cyl, disp, hp)
base_m |> drop_terms(disp)
#> model_spec: ~ cyl + hp